<div class="service-project">
  <div class="container">
    <div class="row">
        <?php
        switch (count($items)) {
        case 1:
          $class = 'col-md-12 col-sm-12 col-xs-12';
          break;
        case 2:
          $class = 'col-md-6 col-sm-6 col-xs-12';
          break;
        case 3:
          $class = 'col-md-4 col-sm-4 col-xs-12';
          break;
        default:
          $class = 'col-md-3 col-sm-3 col-xs-12';
        }
        ?>
        <?php foreach ($items as $item) { ?>
        <div class="<?php echo $class; ?> item">
          <div class="icon"><img src="<?php echo $item['image'] ?>" class="img-responsive"></div>
          <div class="text">
            <div class="title"><?php echo $item['title'] ?></div>
            <div class="sub-title"><?php echo $item['text'] ?></div>
          </div>
        </div>
        <?php } ?>
    </div>
  </div>
</div>
